package com.health.db.service.sm.impl;

import java.util.List;
 
import com.health.db.dao.sm.IVersionControlDao;
import com.health.db.model.VersionControl;
import com.health.db.model.VersionControlExt;
import com.health.db.service.sm.IVersionControlService;

public class VersionControlServiceImpl implements IVersionControlService {
 
	
	IVersionControlDao versionControlDao;


	@Override
	public List<VersionControl> selectByExample(VersionControlExt example) {
		// TODO Auto-generated method stub
		return versionControlDao.selectByExample(example);
	}

	@Override
	public List<VersionControl> selestVersionControl(String os, int flag,
			String version) {
		// TODO Auto-generated method stub
		VersionControlExt example=new VersionControlExt();
		example.setVersion(version);
		example.setPattern(os);
		example.setFlag(flag);
		 
		return versionControlDao.selectByExample(example);
	}


	@Override
	public  List<VersionControl>  selectLastestVersion(String os, int flag) {
		// TODO Auto-generated method stub
		
		// TODO Auto-generated method stub
		VersionControlExt example=new VersionControlExt();
		example.setPattern(os);
		example.setFlag(flag);
		example.setState(1);
		return  versionControlDao.selectByExample(example);
	}

	public IVersionControlDao getVersionControlDao() {
		return versionControlDao;
	}

	public void setVersionControlDao(IVersionControlDao versionControlDao) {
		this.versionControlDao = versionControlDao;
	}
	
	
	
}
